package com.klxedu.ms.gateway.security.authentication.impl;

import java.io.Serializable;

import com.klxedu.ms.gateway.security.authentication.IAuthenticatedUser;

/**
 * 
 * Title: AuthenticatedUserImpl<br>
 * Description: 已授权的用户对象，该对象只包含用户的登录ID，用户名及角色。注：此处的角色为Spring Security角色，非业务角色
 * Copyright @ 2011~2018 Goldgov .All rights reserved.<br>
 * 
 * @author GuoR
 * @createDate 2018年7月18日
 */
public class AuthenticatedUserImpl implements IAuthenticatedUser, Serializable {

	private static final long serialVersionUID = -7044837867554106829L;

	private String accountID;//账号ID
	private String entityID;//用户ID
	private String loginID;
	private String password;
	private String userName;// 登录名
	private String name;//姓名
	private String departID;// 部分ID
	private int state;//账号状态
	private String[] scopeCodes;// 管理范围编码
	private String[] unitScopeCodes;// 所属单位管理范围编码
	private String[] sysIdentityCodes;// 用户身份编码

	private Object extendAccountInfo;

	@Override
	public Object getExtendAccountInfo() {
		return extendAccountInfo;
	}

	@Override
	public void setExtendAccountInfo(Object extendAccountInfo) {
		this.extendAccountInfo = extendAccountInfo;
	}

	public AuthenticatedUserImpl(String loginID, String userName, String password) {
		this.loginID = loginID;
		this.userName = userName;
		this.password = password;
	}

	public AuthenticatedUserImpl(String entityID, String loginID, String userName, String password) {
		this.entityID = entityID;
		this.loginID = loginID;
		this.userName = userName;
		this.password = password;
	}

	public AuthenticatedUserImpl(String entityID, String loginID, String password, String userName, String departID) {
		this.entityID = entityID;
		this.loginID = loginID;
		this.password = password;
		this.userName = userName;
		this.departID = departID;
	}

	@Override
	public String getLoginID() {
		return loginID;
	}

	public void setLoginID(String loginID) {
		this.loginID = loginID;
	}

	@Override
	public String getEntityID() {
		return entityID;
	}

	@Override
	public String getPassword() {
		return this.password;
	}

	@Override
	public void setPassword(String password) {
		this.password = password;

	}

	@Override
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Override
	public String getDepartID() {
		return departID;
	}

	public void setDepartID(String departID) {
		this.departID = departID;
	}

	public void setEntityID(String entityID) {
		this.entityID = entityID;
	}

	public String[] getScopeCodes() {
		return scopeCodes;
	}

	public void setScopeCodes(String[] scopeCodes) {
		this.scopeCodes = scopeCodes;
	}

	public String[] getUnitScopeCodes() {
		return unitScopeCodes;
	}

	public void setUnitScopeCodes(String[] unitScopeCodes) {
		this.unitScopeCodes = unitScopeCodes;
	}

	public String[] getSysIdentityCodes() {
		return sysIdentityCodes;
	}

	public void setSysIdentityCodes(String[] sysIdentityCodes) {
		this.sysIdentityCodes = sysIdentityCodes;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAccountID() {
		return accountID;
	}

	public void setAccountID(String accountID) {
		this.accountID = accountID;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}
}
